package hotel.meituan.oversea.biz.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import hotel.base.oversea.constant.CommonConstants;
import hotel.base.oversea.constant.CommonUrlConstants;
import hotel.base.oversea.constant.MeituanConstants;
import hotel.base.oversea.constant.enums.MessageEnums;
import hotel.base.oversea.utils.*;
import hotel.base.oversea.vo.meituan.response.goods.MtHotelGoodsPriceBaseVo;
import hotel.meituan.oversea.api.entity.MtHotel;
import hotel.meituan.oversea.api.entity.MtHotelDetailOperLog;
import hotel.meituan.oversea.api.entity.MtHotelOrderBooking;
import hotel.meituan.oversea.api.vo.down.request.hotel.MtHotelDetailInfosParamVo;
import hotel.meituan.oversea.api.vo.down.request.hotel.MtHotelDetailParamVo;
import hotel.meituan.oversea.api.vo.down.request.hotel.MtHotelIDsRedisParamVo;
import hotel.meituan.oversea.api.vo.up.response.hotel.MtHotelDetailVo;
import hotel.meituan.oversea.biz.config.service.RedisService;
import hotel.meituan.oversea.biz.mapper.MtHotelDetailOperLogMapper;
import hotel.meituan.oversea.biz.mapper.MtHotelMapper;
import hotel.meituan.oversea.biz.service.MtHotelGoodsService;
import hotel.meituan.oversea.biz.service.MtHotelService;
import hotel.meituan.oversea.biz.task.MeituanUpdateBasicHotelsDetailTask;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.mapper.entity.Example;

import java.util.*;

/**
 * 美团酒店信息Controller
 * @author qiuyy
 * @date 2020-05-15
 */
@Slf4j
@RestController
@RequestMapping("/mtHotel")
@Api(value = "MtHotelController", tags = {"美团酒店接口"})
public class MtHotelController {
    @Autowired
    private MtHotelService mtHotelService;

    @Autowired
    private MtHotelGoodsService mtHotelGoodsService;

    @Autowired
    private MtHotelDetailOperLogMapper mtHotelDetailOperLogMapper;

    @Autowired
    private MtHotelMapper mtHotelMapper;

    @Autowired
    private RedisService redisService;

    @Autowired
    private RestTemplate restTemplate;

    @Autowired
    private MeituanUpdateBasicHotelsDetailTask meituanUpdateBasicHotelsDetailTask;
    @PostMapping("/getPageHotelIds")
    @ApiOperation(value = "获取酒店id",notes="必须经过auth授权")
    public Result<Object> queryPageHotelIds(@RequestBody JSONObject jsonObject){
        //参数校验
        int index = jsonObject.get("index")==null?-1:(int)jsonObject.get("index");//为空就设置为-1
        int pageSize = jsonObject.get("pageSize")==null?-1:(int)jsonObject.get("pageSize");
        if(-1 == index){
            return new Result<>("index不可为空",CommonConstants.REQUEST_ERROR);
        }
        if(-1 == pageSize){
            return new Result<>("pageSize不可为空",CommonConstants.REQUEST_ERROR);
        }
        //发起请求并保存数据
        return mtHotelService.queryPageHotelIds(index,pageSize);
    }
//
    @PostMapping("/getMtHotelIdsData")                                                    //查询酒店ID列表接口
    @ApiOperation(value = "获取酒店主信息接口",notes="必须经过auth授权")
    public Result<Object> getMtHotelIdsData(@RequestBody JSONObject jsonObject){
        //参数校验
        int maxId = jsonObject.get("maxId")==null?-1:(int)jsonObject.get("maxId");
        int pageSize = jsonObject.get("pageSize")==null?-1:(int)jsonObject.get("pageSize");
        if(-1 == maxId){
            return new Result<>("maxId不可为空",CommonConstants.REQUEST_ERROR);
        }
        if(-1 == pageSize){
            return new Result<>("pageSize不可为空",CommonConstants.REQUEST_ERROR);
        }
        //发起请求并保存数据
        return mtHotelService.getMtHotelIdsData(maxId,pageSize);
    }
    @PostMapping("/saveHotelIds")
    @ApiOperation(value = "保存酒店ids接口",notes="必须经过auth授权")
    public Result<Object> saveHotelIds(@RequestBody MtHotelIDsRedisParamVo mtHotelIDsRedisVo){
        //发起请求并保存数据
        Map<Integer,List<Long>> infos = mtHotelIDsRedisVo.getHoteIdsListMaps();
        if(null == infos || infos.size()==0){
            return new Result<>("参数hoteIdsListMaps不可为空", CommonConstants.REQUEST_ERROR);
        }
        return mtHotelService.saveHotelIds(infos);
    }

    @PostMapping("/checkHotelFailure")
    @ApiOperation(value = "判断酒店上下线",notes="必须经过auth授权")
    public Result<Object> checkHotelFailure(@RequestBody Map map){
        //
        if(null == map.get("hotelIds")){
            return new Result<>("hotelIds不可为空 并且最多上送20个",CommonConstants.REQUEST_ERROR);
        }
        List<Long> hotelIds = GsonUtils.jsonToList(String.valueOf(map.get("hotelIds")),Long.class);
        if(null == hotelIds || hotelIds.size()>20){
            return new Result<>("hotelIds不可为空 并且最多上送20个",CommonConstants.REQUEST_ERROR);
        }
        return mtHotelService.checkHotelFailure(hotelIds);
    }
    @GetMapping("/getHhbDownHotels")
    @ApiOperation(value = "获取hhb主动下线酒店ids",notes="必须经过auth授权")
    public Result<Object> getHHbDownHotels(){
        Result result = mtHotelService.getHHbDownHotels();
        return result;
    }

    @PostMapping("/updateUp")
    @ApiOperation(value = "程序判断酒店上线根据酒店详情",notes="必须经过auth授权")
    public Result<Object> updateUp(@RequestBody MtHotelDetailParamVo mtHotelDetailParamVo){
        log.info("静态信息校验，酒店上线了！mtHotelDetailParamVo="+ GsonUtils.GsonString(mtHotelDetailParamVo));
        if(null != mtHotelDetailParamVo && null != mtHotelDetailParamVo.getHotelIds() && mtHotelDetailParamVo.getHotelIds().size()>0 ){
            for (Long id:mtHotelDetailParamVo.getHotelIds()){
                try{
                    MtHotelDetailOperLog mtHotelDetailOperLog = new MtHotelDetailOperLog();
                    mtHotelDetailOperLog.setMtHotelId(String.valueOf(id));
                    mtHotelDetailOperLog.setRemark("");
                    mtHotelDetailOperLog.setCreateTime(new Date());
                    mtHotelDetailOperLog.setState(1);
                    mtHotelDetailOperLog.setId(StringUtil.getUUID());
                    mtHotelDetailOperLog.setType(20);
                    mtHotelDetailOperLogMapper.insert(mtHotelDetailOperLog);
                }catch (Exception e){
                    e.printStackTrace();
                }
                try{
                    MtHotel mtHotel = new MtHotel();
                    mtHotel.setType(1);
                    Example example = new Example(MtHotelOrderBooking.class);
                    Example.Criteria criteria = example.createCriteria();
                    criteria.andEqualTo("mtHotelId",id);
                    mtHotelMapper.updateByExampleSelective(mtHotel,example);
                }catch (Exception e){
                    log.info("updateUp酒店更新酒店库表状态失败 id={},msg={}",id,e.getMessage());
                    e.printStackTrace();
                }
                SendUtils.dingMsgNotLog("[CHECK-HOTEL-IS-UP]",DateUtil.getCurrTime()+" 静态信息校验，酒店上线了！酒店id="+id,MessageEnums.genre.GOODS_STATUS_AND_PRICE.getCode(),restTemplate);
                String swResult = requestSwitchsUpdateHotel(id.intValue(),1);
            }
        }

        return new Result<>();
    }

    public String requestSwitchsUpdateHotel(Integer mtHotelId,Integer status){
        //发起请求
        Map map = new HashMap();
        map.put("mtHotelId",mtHotelId);
        map.put("status",status);//状态 0 下线 1 上线
        log.info("requestSwitchsUpdateHotel请求="+ GsonUtils.GsonString(map));
        Result result = RestTemplateUtils.post(CommonUrlConstants.SWITCHS_ONLINE_HOST+"/switchCreateRoom/downHotel", JSON.toJSONString(map),restTemplate);
        if(result.getCode()!= CommonConstants.SUCCESS){
            SendUtils.dingMsg("[CHECK-HOTEL-IS-UP]酒店上线了，调用携程修改接口失败 ","请求参数："+ JSON.toJSONString(map)+" 响应："+ JSON.toJSONString(result),MessageEnums.genre.GOODS_STATUS_AND_PRICE.getCode(),restTemplate);
        }else{
            log.info("requestSwitchsUpdateHotel响应="+ JSON.toJSONString(result)+",请求参数："+ JSON.toJSONString(map));
        }
        return JSON.toJSONString(result);

    }


    @PostMapping("/getMtHotelDetailForJob")
    @ApiOperation(value = "校验酒店是否可上线根据详情和价格接口",notes="必须经过auth授权")
    public Result<Object> getMtHotelDetailForJob(@RequestBody MtHotelDetailParamVo mtHotelDetailParamVo){
        //参数校验
        List<Long> hotelIds = mtHotelDetailParamVo.getHotelIds();
        Integer strategy = mtHotelDetailParamVo.getStrategy();
        if(StringUtils.isEmpty(hotelIds)){
            return new Result<>("hotelIds不可为空",CommonConstants.REQUEST_ERROR);
        }else{
            if(hotelIds.size()>20){
                return new Result<>("超出，查询酒店最多20",CommonConstants.REQUEST_ERROR);
            }
        }
        if(StringUtils.isEmpty(strategy)){
            strategy = 15;
        }
        //发起请求并保存数据
        Result r =  mtHotelService.getMtHotelDetail(hotelIds,strategy);//请求获取酒店详情数据
        if(r.getCode()==CommonConstants.SUCCESS){
            List<MtHotelDetailVo> voList = (List<MtHotelDetailVo>)r.getData();//获取出酒店详情数据
            //查询到的有酒店详情的酒店id
            List<Long> existHotelIds = new ArrayList<>();
            for (MtHotelDetailVo v:voList){//遍历酒店详情
                if(null != v.getBaseInfo() && null != v.getBaseInfo().getHotelId()){
                    existHotelIds.add(Long.valueOf(v.getBaseInfo().getHotelId()));//将酒店的ID都放到集合中
                }
            }
            //进行查询价格接口
            Map<String, String> priIsNull = new HashMap<>();
            String start = DateUtil.formatDate(DateUtil.addDay(DateUtil.getCurrTime(), 1), "yyyy-MM-dd");
            String end = DateUtil.formatDate(DateUtil.addDay(start, 1), "yyyy-MM-dd");
            Result resultPr = mtHotelGoodsService.saveGetMtHotelGoodsPrice(existHotelIds, null, start, end, null);
            if (resultPr.getCode() == CommonConstants.SUCCESS) {
                List<MtHotelGoodsPriceBaseVo> mtHotelGoodsPriceBaseVoList = (List<MtHotelGoodsPriceBaseVo>) resultPr.getData();
                if (null == mtHotelGoodsPriceBaseVoList || mtHotelGoodsPriceBaseVoList.size() == 0) {
                    for (Long p : existHotelIds) {
                        priIsNull.put(String.valueOf(p), String.valueOf(p));
                    }
                }else{
                    //价格接口有数据，再次匹对数据（查询10家酒店不一定就能返回10家酒店的价格数据）
                    Map<String,String> priApiHotel = new HashMap<>();
                    for (MtHotelGoodsPriceBaseVo b:mtHotelGoodsPriceBaseVoList){
                        priApiHotel.put(String.valueOf(b.getHotelId()),String.valueOf(b.getHotelId()));
                    }
                    for (Long id:existHotelIds){
                        if(null == priApiHotel.get(String.valueOf(id))){
                            priIsNull.put(String.valueOf(id), String.valueOf(id));
                        }
                    }
                }
            }
            //判断是否存在还是为空priIsNull，，则不返回数据
            List<MtHotelDetailVo> voListNew = new ArrayList<>();
            for (MtHotelDetailVo v:voList){
                if(null != v.getBaseInfo() && null != v.getBaseInfo().getHotelId() && null == priIsNull.get(v.getBaseInfo().getHotelId())){
                    voListNew.add(v);
                }
            }
            return new Result<>(GsonUtils.GsonString(voListNew),"success");
        }
        return new Result<>();
    }



    @PostMapping("/getMtHotelDetail")
    @ApiOperation(value = "获取酒店详情接口",notes="必须经过auth授权")
    public Result<Object> getMtHotelDetail(@RequestBody MtHotelDetailParamVo mtHotelDetailParamVo){
        //参数校验
        List<Long> hotelIds = mtHotelDetailParamVo.getHotelIds();
        Integer strategy = mtHotelDetailParamVo.getStrategy();
        if(StringUtils.isEmpty(hotelIds)){
            return new Result<>("hotelIds不可为空",CommonConstants.REQUEST_ERROR);
        }else{
            if(hotelIds.size()>20){
                return new Result<>("超出，查询酒店最多20",CommonConstants.REQUEST_ERROR);
            }
        }
        if(StringUtils.isEmpty(strategy)){
            strategy = 15;
        }
        //发起请求并保存数据
        return mtHotelService.getMtHotelDetail(hotelIds,strategy);
    }

    @PostMapping("/saveHotelInfos")
    @ApiOperation(value = "保存缓存的酒店详情接口",notes="必须经过auth授权")
    public Result<Object> saveHotelInfos(@RequestBody MtHotelDetailInfosParamVo redisHotelInfosMap){
        //发起请求并保存数据
        Map<String,List<MtHotelDetailVo>> infos = redisHotelInfosMap.getRedisHotelInfosMap();
        if(null == infos || infos.size()==0){
            return new Result<>("参数redisHotelInfosMap不可为空", CommonConstants.REQUEST_ERROR);
        }
        return mtHotelService.saveHotelInfos(infos);
    }

    /**
     * 获取最新的上架酒店信息，保存到队列（另一个定时器消费队列）
     *
     * ===>>2020-11-24  调整为 产品静态信息中 将酒店信息push到队列（每天一次）  因为产品方法中也有调用到酒店详情接口
     *
     * @param map
     * @return
     */
    /*@PostMapping("/updateBasicHotelDetailForJob")
    public Result<Object> updateBasicHotelDetailForJob(@RequestBody Map map){
        String timestamp = (String)map.get("timestamp");
        int countTask = 1;//每次一个线程
        Integer timeHotel = 20;//每次20家酒店
        for (int k = 0; k < countTask; k++) {
            if(null != redisService.get("BasicMtHotelInfoCheckUpdateJob_stop")){
                break;
            }
            List<Long> hotelIds = new ArrayList<>();
            for (int j = 0; j < timeHotel; j++) {
                if(null != redisService.get("BasicMtHotelInfoCheckUpdateJob_stop")){
                    break;
                }
                Long oneHotelId = (Long)redisService.RPop(MeituanConstants.REDIS_BASIC_HOTELS_INFO_QUEUE_HOTELS);
                if(!ObjectUtils.isEmpty(oneHotelId)){
                    hotelIds.add(Long.valueOf(oneHotelId));
                }else{
                    if(null != hotelIds && hotelIds.size()>0){
                        meituanUpdateBasicHotelsDetailTask.executeBasicHotels(hotelIds,timestamp+"_"+k+"_"+j);
                    }
                    log.info("{} 当前coutTask，酒店处理完且酒店队列无数据： k={},j={}",timestamp,k,j);
                    return new Result<>();//return 结束当前
                }
                if(hotelIds.size()==timeHotel){
                    meituanUpdateBasicHotelsDetailTask.executeBasicHotels(hotelIds,timestamp+"_"+k+"_"+j);
                    hotelIds = new ArrayList<>();
                }
            }
        }

        return new Result<>();
    }*/

    /**
     * 该方法不做多线程：结束一次调用一次，保存静态酒店（(包含校验失效和新增房型)--》该方法每天被定时器调用一次，，每天更新 一次酒店和物理房型id数据）
     * @return
     */
    @PostMapping("/saveBasicHotelDetailForJob")
    public Result<Object> saveBasicHotelDetailForJob(){
        log.info(" {} >>>>>>>>> saveBasicHotelDetailForJob  开始执行时间：{}", DateUtil.getNowTime());
        String details = (String)redisService.RPop(MeituanConstants.REDIS_QUEUE_SAVE_BASIC_HOTEL_DETAILS_INFO);//静态酒店每次最多查询返回20个，一次pop得到最多20个  "[{\"baseInfo\":{\"hotelId\":91031518,\"pointName\":\"万年大酒店\",\"info\":\"酒店拥有设备齐全、时尚设计的精品客房、商务房、豪华客房、标准房100多间，尽显现代化的商务设施和细致殷勤的专业服务，极尽粤北商务之最。装潢考究、独具匠心的自助早餐厅、荟萃琳琅满目之美馔佳肴，为您在闹市中心提供安静和舒适的休闲空间。附属设施：商场、贵重物品保管、代邮、24小时全角度监控的大型停车场等各种设施，24小时为宾客提供最快捷的服务。\",\"longitude\":114302493,\"latitude\":25108736,\"address\":\"雄州街道雄中路主田路口侧边1-6号门店\",\"cityName\":\"韶关市\",\"cityLocationId\":440200,\"locationName\":\"南雄市\",\"avgScore\":\"45\",\"phone\":\"0751-3801111\",\"openInfo\":\"\",\"closeStatus\":0,\"frontImage\":\"http://p0.meituan.net/tdchotel/020c12e7f4b8f591edb989a6e0249249105963.jpg\",\"brandId\":\"0\",\"brandName\":\"\"},\"extendInfo\":{\"poiExtInfo\":{\"hotelId\":91031518,\"openDate\":\"2016/01\",\"decorationDate\":\"2016/02\",\"roomNum\":\"80\",\"floorNum\":\"15\",\"hotelStar\":5,\"checkinTimeBegin\":\"14:00\",\"checkinTimeEnd\":\"0\"}},\"roomInfos\":[{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"176829899\",\"realRoomId\":\"26377093\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"2573862\",\"realRoomId\":\"26376288\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"149618793\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"176829896\",\"realRoomId\":\"2573860\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"149618792\",\"realRoomId\":\"3536537\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"169481177\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"2573860\",\"realRoomId\":\"26377093\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"176829903\",\"realRoomId\":\"2573865\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"176829901\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"169481171\",\"realRoomId\":\"3536550\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"144869288\",\"realRoomId\":\"24726595\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"2573868\",\"realRoomId\":\"3536537\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"149618791\",\"realRoomId\":\"3536550\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253629\",\"realRoomId\":\"2573860\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"169481174\",\"realRoomId\":\"2573862\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"149618790\",\"realRoomId\":\"2573860\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253628\",\"realRoomId\":\"2573860\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"169481175\",\"realRoomId\":\"2573860\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"2573866\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"149618789\",\"realRoomId\":\"2573865\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253631\",\"realRoomId\":\"2573862\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"169481172\",\"realRoomId\":\"2573865\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"176829892\",\"realRoomId\":\"3536550\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"2573865\",\"realRoomId\":\"26376292\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"149618788\",\"realRoomId\":\"2573862\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253630\",\"realRoomId\":\"2573862\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"169481173\",\"realRoomId\":\"3536537\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"176829893\",\"realRoomId\":\"3536537\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"3559569\",\"realRoomId\":\"3536550\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"175354009\",\"realRoomId\":\"26233819\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"172124654\",\"realRoomId\":\"2573865\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"172124655\",\"realRoomId\":\"2573860\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"4988769\",\"realRoomId\":\"3536537\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253633\",\"realRoomId\":\"2573865\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253632\",\"realRoomId\":\"2573865\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253635\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"172124656\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253634\",\"realRoomId\":\"3536537\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253637\",\"realRoomId\":\"3536550\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"154253636\",\"realRoomId\":\"3536553\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"174472606\",\"realRoomId\":\"2573862\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"175353994\",\"realRoomId\":\"26233808\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"174472604\",\"realRoomId\":\"3536550\"}},{\"roomBaseInfo\":{\"hotelId\":\"91031518\",\"roomId\":\"174472605\",\"realRoomId\":\"3536537\"}}]}]";//
        if(null != details){
            List<MtHotelDetailVo> voList = GsonUtils.jsonToList(details, MtHotelDetailVo.class);
            mtHotelService.saveBasicHotelInfo(voList);
        }

        return new Result<>();
    }


}
